<template>
    <div class="headerWrap"  v-if="seller">
      <img class="blur" :src="seller.avatar" alt="">
      <div class="headerMain">
        <img class="avatar" :src="seller.avatar" alt="">
        <div class="headerContent">
          <h2 class="name">
            <i></i>
            {{seller.name}}
          </h2>
          <p class="description">{{seller.description}} / {{seller.deliveryTime}}分钟送达</p>
          <p class="supports" v-if="seller.supports">
            <span>
              <i>{{seller.supports[0].type}}</i> {{seller.supports[0].description}}
            </span>
            <b>
              {{seller.supports.length}}个
              <i class="iconfont icon-arrow-right"></i>
            </b>
          </p>
        </div>
      </div>
      <div class="headerBulletin">
        <span class="bulletin"></span>
        <span class="bulletinText">{{seller.bulletin}}</span>
        <i class="iconfont icon-arrow-right"></i>
      </div>
    </div>
</template>

<script>
  export default{
    props:{
        seller:{
            type:Object,
            default:function(){
                return null;
            }
        }
    }
  }
</script>

<style  lang="scss">

  @import "../../common/scss/fn.scss";
.headerWrap {
  position: relative;
  overflow: hidden;
  .blur {
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    filter: blur(10px);
  }
  .headerMain {
    padding: 24px 12px 18px 104px;
    background: rgba(7, 17, 27, .3);
    .avatar {
      position: absolute;
      width: 64px;
      height: 64px;
      border-radius: 2px;
      left: 24px;
    }
    .headerContent {
      h2 {
        font-size: 16px;
        color: #fff;
        font-weight: bold;
        line-height: 18px;
        i {
          margin-right: 6px;
          display: inline-block;
          width: 30px;
          height: 18px;
          @include bg-img(brand);
          vertical-align: top;
        }
      }
      .description {
        font-size: 12px;
        color: #fff;
        font-weight: 200;
        line-height: 12px;
        margin: 8px 0 10px 0;
      }
      .supports {
        position: relative;
        font-size: 10px;
        color: #fff;
        font-weight: 200;
        line-height: 12px;
        b{
          position: absolute;
          right:0;
          top:-8px;
          padding:7px 8px;
          background: rgba(0,0,0,.2);
          border-radius: 24px;
          i{
            vertical-align: middle;
          }
        }
      }
    }
  }
  .headerBulletin {
    height: 28px;
    line-height: 28px;
    position: relative;
    padding: 0 22px 0 12px;
    font-size: 10px;
    color: #fff;
    font-weight: 200;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: rgba(7, 17, 27, .5);
    .bulletin{
      display: inline-block;
      margin-right: 4px;
      width: 22px;
      height: 12px;
      vertical-align: middle;
      @include bg-img(bulletin);
    }
    .bulletinText{
      vertical-align: top;
      margin-right:4px;
    }
    .icon-arrow-right{
      position: absolute;
      width:28px;
      text-align: center;
      right:0;
      top:50%;
      transform: translateY(-50%);
    }
  }
}
</style>
